package test.utils;

import org.springframework.stereotype.Component;
import test.dto.FileUploadRequestDTO;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : example
 * @ Author: XuLeHuang
 * @ Date: 2022/6/8 17:30
 * @ Description:
 */
@Component
public class FilePathUtil {

    public static String getPath(FileUploadRequestDTO param) {
        int lastIndexOf = param.getPath().lastIndexOf("\\");
        String dirPath = param.getPath().substring(0, lastIndexOf);
        return dirPath;
    }
}
